﻿using System;

namespace CommonModel.Model
{
    public class HeaderData
    {
        private String ip; // ip地址F
        private int port; // 端口
        private int devaddr; // 设备地址
        private long timestamp; // 时间戳
        private String protocol; // 协议类型

        private String flag; // 源数据包起始标识
        private String secondflag; // 源数据包起始标识
        private String stationcode; // 台站编码
        private String device; // 设备类型码
        private String deviceType; // 设备类型
        private String msgType; // 消息类型
        private String xmlType; // 多版本对应一个xml类型

        private String vendor; // 厂家代码
        private String hardware; // 硬件版本
        private String software; // 软件版本
        private String transmit; // 传输协议版本
        private String memo; // 待定字段
        private int bodybegin; // 数据消息开始位置;
        private int bodysize; // 数据消息长度;
        private String errorFlag = "no";//错误包的标识

        public string Ip { get => ip; set => ip = value; }
        public int Port { get => port; set => port = value; }
        public int Devaddr { get => devaddr; set => devaddr = value; }
        public long Timestamp { get => timestamp; set => timestamp = value; }
        public string Protocol { get => protocol; set => protocol = value; }
        public string Flag { get => flag; set => flag = value; }
        public string Secondflag { get => secondflag; set => secondflag = value; }
        public string Stationcode { get => stationcode; set => stationcode = value; }
        public string Device { get => device; set => device = value; }
        public string DeviceType { get => deviceType; set => deviceType = value; }
        public string MsgType { get => msgType; set => msgType = value; }
        public string XmlType { get => xmlType; set => xmlType = value; }
        public string Vendor { get => vendor; set => vendor = value; }
        public string Hardware { get => hardware; set => hardware = value; }
        public string Software { get => software; set => software = value; }
        public string Transmit { get => transmit; set => transmit = value; }
        public string Memo { get => memo; set => memo = value; }
        public int Bodybegin { get => bodybegin; set => bodybegin = value; }
        public int Bodysize { get => bodysize; set => bodysize = value; }
        public string ErrorFlag { get => errorFlag; set => errorFlag = value; }
    }
}
